
package MapItens;

import Managers.ItemManager;
import MapItens.Characters.*;
import java.io.IOException;
import javax.microedition.m3g.World;

public class ItemFactory {
    
    private World flunker_world;
    private ItemManager item_manager;
    
    public ItemFactory(ItemManager item_manager, World world){
        flunker_world = world;
        this.item_manager = item_manager;
    }

  public Item getItem(char itemId) throws IOException {
  
      Item result = null;
      
      switch(itemId){
      
          //This is the pogoroo character
          case 'p' : 
              result = new Pogoroo(item_manager,flunker_world);  
              break;    
      }  
      
      return result;
  }
}